/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.google.code.peersim.metrics;

/**
 * This interface must be implemented by those classes providing a proxymity-metric
 * service. Those classes must also define their own extension of the
 * {@link MeasurableEntityIfc} interface.
 *
 * @see MeasurableEntityIfc
 *
 * @author frusso
 * @version 0.1
 * @since 0.1
 */
public interface ProximityMetricIfc<T extends ProximityMetricIfc.MeasurableEntityIfc> {

  /**
   * Mark-up interface that must be used by {@link ProximityMetricIfc} concrete
   * implementations to derive their own interfaces that must be implemented by
   * those classes that should undergo measurement.
   *
   * @author frusso
   * @version 0.1
   * @since 0.1
   */
  public static interface MeasurableEntityIfc {
  }

  /**
   * Computes the signed distance from {@code a} to {@code b}.
   *
   * @param a The source
   * @param b The destination
   * @return The signed distance
   */
  public double signedDistanceBetween(T a, T b);

  /**
   * Computes the unsigned distance from {@code a} to {@code b}.
   *
   * @param a The source
   * @param b The destination
   * @return The unsigned distance
   */
  public double unsignedDistanceBetween(T a, T b);
}